-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sessions): session permissions storage API #242
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* `pci` - PCI to revoke. | ||
* `signature` - Signature signed by the key provided during the permission creation. | ||
* `context` - Permissions context object to update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: put these as comments inline with the type definition for easier reading
f644093
to
982c7ac
Compare
982c7ac
to
10733a3
Compare
The POST request body should be in JSON format and following schema: | ||
|
||
```typescript | ||
{ | ||
permission: | ||
{ | ||
"permissionType": string, | ||
"data": string, | ||
"required": boolean, | ||
"onChainValidated": boolean | ||
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request body should have permission struct defined in ERC7715 + extra field onChainValidated
if needed but not sure how will Dapp/Client know this( onChainValidated
) information.
|
||
```typescript | ||
{ | ||
pci: string, | ||
signature: string, | ||
context: { | ||
signer: { | ||
type: string, | ||
data:{ | ||
ids: string[], | ||
} | ||
}, | ||
expiry: number, | ||
signerData: { | ||
userOpBuilder: string | ||
}, | ||
factory: string, | ||
factoryData: string, | ||
permissionsContext: string | ||
} | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
context
field should contain the complete response of wallet_grantPermission
request received by the Dapp/client from wallet, because it contains list of granted permissions
for requested session. The initial set of permissions stored by the co-signer could be different than final granted permissions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the context should be the list of granted permissions from ERC7715?
977c11e
to
f89379c
Compare
f89379c
to
31bf313
Compare
31bf313
to
892e380
Compare
892e380
to
e471921
Compare
|
||
### Get permissions list for account | ||
|
||
Used to get account list of active sessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need either a new endpoint for revoked sessions, or including a field in the pci that includes the "status" ; else we cannot displayed previously revoked sessions on the ui
This is session permissions off-chain storage API.
The corresponding Notion doc.